app.controller('indexController',function ($scope,$controller ,loginService,$interval) {

    //读取当前登陆人
    $scope.showLoginName=function () {
        loginService.loginName().success(
            function (response) {
                //获取当前登陆用户
                $scope.loginName=response.loginName;
                //获取当前时间
                $scope.loginTime=new Date();
            }
        )
    }
})